package xyz.lne.researchgroupmanage.service;

import xyz.lne.researchgroupmanage.entity.Research;
import xyz.lne.researchgroupmanage.entity.UserResearch;
import com.baomidou.mybatisplus.extension.service.IService;
import xyz.lne.researchgroupmanage.service.dataTransferObject.UserDTO;
import xyz.lne.researchgroupmanage.service.dataTransferObject.UserResearchDTO;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author team7
 * @since 2021-01-19
 */
public interface UserResearchService extends IService<UserResearch> {
    List<UserResearchDTO> findUsersByresearch(Integer researchId);

    List<UserResearchDTO> findApplyUsersByresearch(Integer researchId);

    Boolean deleteUserResearch(Integer researchId);

    /**
     * 通过课题下的用户申请
     * @param researchId
     * @param userId
     * @return
     */
    Integer PassApplyUsersByResearch(Integer researchId, Integer userId);

    /**
     * 拒绝课题下的用户申请
     * @param researchId
     * @param userId
     * @return
     */
    Integer RejectApplyUsersByResearch(Integer researchId, Integer userId);

    /**
     * 申请加入课题
     * @param researchId
     * @param userId
     * @return
     */
    Integer applyToResearch(Integer researchId, Integer userId);
}
